package com.star.jersey.mybatisplus.base.dal.crud.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 基础实体
 * @author zhouhengzhe
 */
@Data
public abstract class BaseDO implements Serializable {
    private static final long serialVersionUID = 8243162602142898786L;
    @TableId(
            value = "id",
            type = IdType.AUTO
    )
    private Long id;
    @TableField(
            value = "create_time",
            fill = FieldFill.INSERT
    )
    private LocalDateTime createTime;
    @TableField(
            value = "update_time",
            fill = FieldFill.INSERT_UPDATE
    )
    private LocalDateTime updateTime;
    @TableLogic(
            value = "1",
            delval = "0"
    )
    @TableField("active")
    private Integer active = 1;
    public static final String ID = "id";
    public static final String CREATE_TIME = "create_time";
    public static final String UPDATE_TIME = "update_time";
    public static final String ACTIVE = "active";
}